INCLUDE = -I ThostTraderApi
CFLAG = -g -Wall -Wno-write-strings
all: AutoTrader.o MdSpi.o TraderSpi.o
	g++ -o ctp2 ${CFLAG} AutoTrader.o MdSpi.o TraderSpi.o ${INCLUDE} -lpthread -lthosttraderapi -lthostmduserapi -L ThostTraderApi
AutoTrader.o: AutoTrader.cpp DataSniffer.h Common.h
	g++ -c ${CFLAG} AutoTrader.cpp ${INCLUDE}
MdSpi.o:
	g++ -c ${CFLAG} MdSpi.cpp ${INCLUDE}
TraderSpi.o:
	g++ -c ${CFLAG} TraderSpi.cpp ${INCLUDE}
clean:
	rm -rf *.o ctp2 *.con
